import request from '@/utils/request'

// 查询设备升级计划列表
export function listdevicePlanInfo(query) {
    return request({
        url: '/business/devicePlanInfo/list',
        method: 'get',
        params: query
    })
}

// 查询设备升级计划详细
export function getdevicePlanInfo(id) {
    return request({
        url: '/business/devicePlanInfo/' + id,
        method: 'get'
    })
}

// 新增设备升级计划
export function adddevicePlanInfo(data) {
    return request({
        url: '/business/devicePlanInfo',
        method: 'post',
        data: data
    })
}

// 修改设备升级计划
export function updatedevicePlanInfo(data) {
    return request({
        url: '/business/devicePlanInfo',
        method: 'put',
        data: data
    })
}

// 删除设备升级计划
export function deldevicePlanInfo(id) {
    return request({
        url: '/business/devicePlanInfo/' + id,
        method: 'delete'
    })
}

// 导出设备升级计划
export function exportdevicePlanInfo(query) {
    return request({
        url: '/business/devicePlanInfo/export',
        method: 'get',
        params: query
    })
}

// /business/devicePlanInfo/restartUpdate/{id}\

export function restartUpdate(id) {
    return request({
        url: `/business/devicePlanInfo/restartUpdate/${id}`,
        method: 'get'
    })
}